inline
Proactor *EpollAsynchOpt::proactor (void) const
{
    return this->proactor_;
}
inline
EpollProactor *EpollAsynchOpt::proactor_impl (void) const
{
    return this->epoll_proactor_;
}
inline
EpollAsynchResult *EpollAsynchOpt::result (void) const
{
    return this->result_;
}
inline
void EpollAsynchOpt::result (EpollAsynchResult *r)
{
    this->result_ = r;
}
inline
NDK_HANDLE EpollAsynchOpt::handle (void) const
{
    return this->handle_;
}
// -------------------------------------------------------------------
inline
size_t EpollAsynchResult::bytes_transferred (void) const
{
    return this->bytes_transferred_;
}
inline
int EpollAsynchResult::success (void) const
{
    return this->success_;
}
inline
const void *EpollAsynchResult::completion_key (void) const
{
    return this->completion_key_;
}
inline
NDK_HANDLE EpollAsynchResult::get_handle (void) const
{
    return this->handle_;
}
inline
int EpollAsynchResult::error (void) const
{
    return this->error_;
}
inline
long long EpollAsynchResult::offset (void) const
{
    return this->offset_;
}
// ----------------------------------------------------------------
inline
size_t EpollAsynchReadStreamResult::bytes_to_read (void) const
{
    return this->bytes_to_read_;
}
inline
void EpollAsynchReadStreamResult::bytes_to_read (size_t bytes)
{
    this->bytes_to_read_ = bytes;
}
inline
MessageBlock *EpollAsynchReadStreamResult::message_block (void) const
{
    return this->message_block_;
}
inline
void EpollAsynchReadStreamResult::message_block (MessageBlock *mb)
{
    this->message_block_ = mb;
}
inline
NDK_HANDLE EpollAsynchReadStreamResult::handle (void) const
{
    return this->handle_;
}
inline
NDK_HANDLE EpollAsynchReadStreamResult::event (void) const
{
    return NDK_INVALID_HANDLE;
}
inline
//int EpollAsynchReadStreamResult::complete (void)
int EpollAsynchReadStreamResult::complete (size_t /*bytes_transferred*/,
	int /*success*/,
	const void * /*completion_key*/,
	int /*error*/)
{
    TRACE ("");
    // Create the interface result class.
    AsynchReadStream::Result result (this);
    
    if (this->asynch_handler_)
        return this->asynch_handler_->handle_read_stream (result);
    return -1;
}
// --------------------------------------------------------------------
inline
NDK_HANDLE EpollAsynchWriteStreamResult::handle (void) const
{
    return this->handle_;
}
inline
NDK_HANDLE EpollAsynchWriteStreamResult::event (void) const
{
    return NDK_INVALID_HANDLE;
}
inline
size_t EpollAsynchWriteStreamResult::bytes_to_write (void) const
{
    return this->bytes_to_write_;
}
inline
void EpollAsynchWriteStreamResult::bytes_to_write (size_t bytes)
{
    this->bytes_to_write_ = bytes;
}
inline
MessageBlock *EpollAsynchWriteStreamResult::message_block (void) const
{
    return this->message_block_;
}
inline
void EpollAsynchWriteStreamResult::message_block (MessageBlock *mb)
{
    this->message_block_ = mb;
}
inline
//int EpollAsynchWriteStreamResult::complete (void)
int EpollAsynchWriteStreamResult::complete (size_t /*bytes_transferred*/,
	int /*success*/,
	const void * /*completion_key*/,
	int /*error*/)
{
    TRACE ("");
    // Create the interface result class.
    AsynchWriteStream::Result result (this);
    
    if (this->asynch_handler_)
        return this->asynch_handler_->handle_write_stream (result);
    return -1;
}
// ---------------------------------------------------------------------
inline
NDK_HANDLE EpollAsynchAcceptResult::listen_handle (void) const
{
    return this->handle_;
}
inline
size_t EpollAsynchAcceptResult::num_to_accept (void) const
{
    return this->num_to_accept_;
}
inline
void EpollAsynchAcceptResult::num_to_accept (size_t bytes)
{
    this->num_to_accept_ = bytes;
}
inline
NDK_HANDLE EpollAsynchAcceptResult::event (void) const
{
    return NDK_INVALID_HANDLE;
}
inline
MessageBlock *EpollAsynchAcceptResult::message_block (void) const
{
    return this->message_block_;
}
inline
void EpollAsynchAcceptResult::message_block (MessageBlock *mb)
{
    this->message_block_ = mb;
}
inline
//int EpollAsynchAcceptResult::complete (void)
int EpollAsynchAcceptResult::complete (size_t /*bytes_transferred*/,
	int /*success*/,
	const void * /*completion_key*/,
	int /*error*/)
{
    TRACE ("");
    // Create the interface result class.
    AsynchAccept::Result result (this);
    
    if (this->asynch_handler_)
	return this->asynch_handler_->handle_accept (result);
    return -1;
}

